Skip to content

fix(ci): probe common Node.js paths on Windows when PATH lookup fails#401

Open
alezander86 wants to merge 1 commit into
codemie-ai:mainfrom
alezander86:fix/windows-installer-node-path-detection
Open

fix(ci): probe common Node.js paths on Windows when PATH lookup fails#401
alezander86 wants to merge 1 commit into
codemie-ai:mainfrom
alezander86:fix/windows-installer-node-path-detection

Conversation

@alezander86

@alezander86 alezander86 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • install/windows/install.ps1: Add fallback path probing for Node.js when Get-CommandPath returns empty. GUI apps like the Connect wizard may not inherit the user's shell PATH, so node.exe at C:\Program Files\nodejs\ is invisible to the installer even though it's installed.

Problem

Users who install Node.js via the company portal (installs to C:\Program Files\nodejs\) see "Check Node.js & npm failed — Node.js not found" in the Connect wizard. Root cause: the Electron app spawns processes that don't inherit user-level PATH entries.

Fix

After the initial Get-CommandPath 'node.exe' fails, the script now probes:

  • %ProgramFiles%\nodejs\node.exe
  • %ProgramFiles(x86)%\nodejs\node.exe
  • %LOCALAPPDATA%\Programs\nodejs\node.exe

This mirrors the pattern already used by isGitInstalled in the native Swift wizard.

Test plan

  • Run install.ps1 on a Windows machine where Node.js is installed via company portal and not in PATH
  • Verify installer detects Node.js via fallback probe and completes successfully
  • Verify codemie doctor passes after install

Ref: INC0000773156

@alezander86 alezander86 changed the title fix(install): probe common Node.js paths on Windows when PATH lookup fails fix(ci): probe common Node.js paths on Windows when PATH lookup fails Jun 29, 2026
…up fails

GUI apps like Connect wizard may not inherit the user's shell PATH,
causing Node.js detection to fail even when Node is installed at
C:\Program Files\nodejs\. Add fallback probes for the most common
install locations before throwing 'Node.js not found'.

Probed paths:
- %ProgramFiles%\nodejs\node.exe
- %ProgramFiles(x86)%\nodejs\node.exe
- %LOCALAPPDATA%\Programs\nodejs\node.exe

Fixes: INC0000773156

Generated with AI

Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
@alezander86 alezander86 force-pushed the fix/windows-installer-node-path-detection branch from a0244d1 to 303df3f Compare June 29, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant